package com.angel.bo.admin.config.init;

import com.angel.bo.admin.service.DictService;
import com.angel.bo.admin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class AdminApplicationRunner implements ApplicationRunner{

    @Autowired
    private DictService dictService;

    @Autowired
    private UserService userService;

    @Override
    public void run(ApplicationArguments applicationArguments) throws Exception {
        dictService.initCacheDictInfo();
        userService.initPermissionData();
    }
}
